#ifndef __SKININFO_H__
#define __SKININFO_H__
#pragma once

#include "AniImport.h"
#include <map>
#include <vector>

class SkinInfo
{
public:
	SkinInfo()
		: offsetMat(ckMat::UNIT)
	{}

	virtual ~SkinInfo()
	{
		
	}

	std::string boneName;
	
	
	std::vector< u16 > vertexIds;
	std::vector< r32 > weights;

	ckMat offsetMat;

	

	SkinInfo& operator=(const SkinInfo& src) 
	{ 
		boneName = src.boneName;
		
		

		vertexIds.assign( src.vertexIds.begin(), src.vertexIds.end() );
		weights.assign( src.weights.begin(), src.weights.end() );

		offsetMat = src.offsetMat;

		return *this;
	}

	SkinInfo& SetData(IMPORT_SKIN& src) 
	{ 
		boneName = src.chBoneName;
		
		
		for( u16 i=0;i<src.iTotalWeight;i++ )
		{
			

			
			vertexIds.push_back( (u16)src.pVertexIndex[i] );
			weights.push_back( src.pWeight[i] );


		}

		/*ckMat mat_ = ckMat(ckVec(src.matOffset._11,src.matOffset._12,src.matOffset._13)
			,ckVec(src.matOffset._21,src.matOffset._22,src.matOffset._23)
			,ckVec(src.matOffset._31,src.matOffset._32,src.matOffset._33)
			,ckVec(src.matOffset._41,src.matOffset._42,src.matOffset._43));*/
		offsetMat = ckMat::fromR32x16(src.matOffset.m);//  = mat_;

		

		return *this;
	}

	
	
};




#endif	//	__SKININFO_H__